fix: pass agentSpec with name and role to createAuthoringBundle @W-21220597@ #324
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes
agent_labelanddescriptionin generated.agentfiles always showing hardcoded defaults ("New Agent"and"New agent description") instead of reflecting the user-provided--nameflag. TheagentSpecargument is now always passed toScriptAgent.createAuthoringBundle()withname,developerName, androleset from user input, withrolefalling back to the spec file's value when a spec is provided.What issues does this PR fix or reference?
@W-21220597@
Functionality Before
Running
sf agent generate authoring-bundle --no-spec --name "My Agent" --api-name MyAgentproduced:Functionality After
Running the same command now produces:
When a spec file with a
rolefield is provided, that value is used fordescriptioninstead.Testing Setup Notes
sf agent generate authoring-bundle --no-spec --name "Test Agent" --api-name TestAgent --target-org <org>and verify the.agentfile hasagent_label: "Test Agent"anddescription: "Test Agent description"--spec <path-to-spec>where the spec has arolefield, and verifydescriptionmatches the spec'sroleagent_labelanddescriptionin both with-spec and no-spec cases